﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Price
{
    public class Transport
    {
        protected string name;
        protected int pr;
        protected string type;
        protected int pri;


        public string getName()
        {
            return this.name;
        }
        public void setName(string name)
        {
            this.name = name;
        }


        public int getPr()
        {
            return this.pr;
        }
        public void setPr(int pr)
        {
            this.pr = pr;
        }


        public void setType(string type)
        {
            this.type = type;
        }
        public string getType()
        {
            return this.type;
        }


        public int getPri()
        {
            return this.pri;
        }
        public void setPri(int pri)
        {
            this.pri = pri;
        }
    }
    public class Avto : Transport
    {
        public object type1;
        public Avto()
            : base()
        {
            this.type = "Avto";

        }
    }

    public class Electro : Transport
    {
        public Electro()
            : base()
        {
            this.type = "Electro";

        }
    }


    public class Bus : Avto
    {
        public Bus()
            : base()
        {
            this.name = "Автобус";
            this.pri = 12;
        }
    }

    public class Taxi : Avto
    {
        public Taxi()
            : base()
        {
            this.name = "Такси";
            this.pri = 100;
        }
    }



 
    public class Streetcar : Electro
    {
        public Streetcar()
            : base()
        {
            this.name = "Трамвай";
            this.pri = 15;
        }

    }

    public class Trolleybus : Electro
    {
        public Trolleybus()
            : base()
        {
            this.name = "Троллейбус";
            this.pri = 10;
        }
    }

    
}